﻿//********************************************************************************//
//创建日期：<创建日期，2010-08-02>
//创建作者：<王一飞，wangyifei@shanghai3h.com>
//功能说明：YS_JX_GONGSIXX实体层次
//********************************************************************************//

#region Entity

using System;
using System.Data;
using Entity;
using Oracle.DataAccess.Client;
using Platform.Configuration;
using Platform.Data;

namespace Entity
{
    [Serializable]
    public class YS_JX_GONGSIXX
    {
        private decimal? m_dec_i_beiyong3;

        private decimal? m_dec_i_beiyong4;

        private decimal? m_dec_i_jlzt;

        private decimal? m_dec_i_leixing;

        private decimal? m_dec_i_yewuy;

        private decimal m_dec_id;

        private DateTime? m_DT_d_caozuosj;

        private DateTime? m_DT_d_xinzengrq;

        private DateTime? m_DT_d_xiugai;

        private string m_str_i_xiugair;

        private string m_str_s_beiyong1;

        private string m_str_s_beiyong2;

        private string m_str_s_beizhu;

        private string m_str_s_bianhao;

        private string m_str_s_caozuor;

        private string m_str_s_dizhi;

        private string m_str_s_jubianh;

        private string m_str_s_lianxibm;

        private string m_str_s_lianxidh;

        private string m_str_s_lianxir;

        private string m_str_s_mingcheng;

        private string m_str_s_youbian;

        private string m_str_s_zhandianbh;

        /// <summary>
        ///     自增量
        /// </summary>
        public decimal ID
        {
            get { return m_dec_id; }
            set { m_dec_id = value; }
        }

        /// <summary>
        ///     站点编号
        /// </summary>
        public string S_ZHANDIANBH
        {
            get { return m_str_s_zhandianbh; }
            set { m_str_s_zhandianbh = value; }
        }

        /// <summary>
        ///     公司编号
        /// </summary>
        public string S_BIANHAO
        {
            get { return m_str_s_bianhao; }
            set { m_str_s_bianhao = value; }
        }

        /// <summary>
        ///     公司名称
        /// </summary>
        public string S_MINGCHENG
        {
            get { return m_str_s_mingcheng; }
            set { m_str_s_mingcheng = value; }
        }

        /// <summary>
        ///     局编号
        /// </summary>
        public string S_JUBIANH
        {
            get { return m_str_s_jubianh; }
            set { m_str_s_jubianh = value; }
        }

        /// <summary>
        ///     地址
        /// </summary>
        public string S_DIZHI
        {
            get { return m_str_s_dizhi; }
            set { m_str_s_dizhi = value; }
        }

        /// <summary>
        ///     邮编
        /// </summary>
        public string S_YOUBIAN
        {
            get { return m_str_s_youbian; }
            set { m_str_s_youbian = value; }
        }

        /// <summary>
        ///     联系部门
        /// </summary>
        public string S_LIANXIBM
        {
            get { return m_str_s_lianxibm; }
            set { m_str_s_lianxibm = value; }
        }

        /// <summary>
        ///     联系人
        /// </summary>
        public string S_LIANXIR
        {
            get { return m_str_s_lianxir; }
            set { m_str_s_lianxir = value; }
        }

        /// <summary>
        ///     联系电话
        /// </summary>
        public string S_LIANXIDH
        {
            get { return m_str_s_lianxidh; }
            set { m_str_s_lianxidh = value; }
        }

        /// <summary>
        ///     业务员编号
        /// </summary>
        public decimal? I_YEWUY
        {
            get { return m_dec_i_yewuy; }
            set { m_dec_i_yewuy = value; }
        }

        /// <summary>
        ///     修改日期
        /// </summary>
        public DateTime? D_XIUGAI
        {
            get { return m_DT_d_xiugai; }
            set { m_DT_d_xiugai = value; }
        }

        /// <summary>
        ///     修改人编号
        /// </summary>
        public string I_XIUGAIR
        {
            get { return m_str_i_xiugair; }
            set { m_str_i_xiugair = value; }
        }

        /// <summary>
        ///     新增日期
        /// </summary>
        public DateTime? D_XINZENGRQ
        {
            get { return m_DT_d_xinzengrq; }
            set { m_DT_d_xinzengrq = value; }
        }

        /// <summary>
        ///     类型(0:本月;1:下月)
        /// </summary>
        public decimal? I_LEIXING
        {
            get { return m_dec_i_leixing; }
            set { m_dec_i_leixing = value; }
        }

        /// <summary>
        ///     备注
        /// </summary>
        public string S_BEIZHU
        {
            get { return m_str_s_beizhu; }
            set { m_str_s_beizhu = value; }
        }

        /// <summary>
        ///     记录状态(0:正常;-1:逻辑删除)
        /// </summary>
        public decimal? I_JLZT
        {
            get { return m_dec_i_jlzt; }
            set { m_dec_i_jlzt = value; }
        }

        /// <summary>
        ///     操作人
        /// </summary>
        public string S_CAOZUOR
        {
            get { return m_str_s_caozuor; }
            set { m_str_s_caozuor = value; }
        }

        /// <summary>
        ///     操作时间
        /// </summary>
        public DateTime? D_CAOZUOSJ
        {
            get { return m_DT_d_caozuosj; }
            set { m_DT_d_caozuosj = value; }
        }

        /// <summary>
        ///     备用1
        /// </summary>
        public string S_BEIYONG1
        {
            get { return m_str_s_beiyong1; }
            set { m_str_s_beiyong1 = value; }
        }

        /// <summary>
        ///     备用2
        /// </summary>
        public string S_BEIYONG2
        {
            get { return m_str_s_beiyong2; }
            set { m_str_s_beiyong2 = value; }
        }

        /// <summary>
        ///     备用3
        /// </summary>
        public decimal? I_BEIYONG3
        {
            get { return m_dec_i_beiyong3; }
            set { m_dec_i_beiyong3 = value; }
        }

        /// <summary>
        ///     备用4
        /// </summary>
        public decimal? I_BEIYONG4
        {
            get { return m_dec_i_beiyong4; }
            set { m_dec_i_beiyong4 = value; }
        }
    }
}

#endregion

#region EntityProcess

namespace BLL.Access
{
    //using System.Data.OracleClient;

    public class YS_JX_GONGSIXXProcess
    {
        #region Field

        protected string conn;

        #endregion

        #region Construction

        public YS_JX_GONGSIXXProcess()
        {
            conn = ConfigHelper.PlatformConnString;
        }

        #endregion

        #region public

        /// <summary>
        ///     根据YS_JX_GONGSIXX实体添加或者修改YS_JX_GONGSIXX信息
        /// </summary>
        public bool InsertOrUpdate(YS_JX_GONGSIXX YS_JX_GONGSIXX, OracleTransaction Transaction)
        {
            if (YS_JX_GONGSIXX.ID == 0)
                InsertYS_JX_GONGSIXX(YS_JX_GONGSIXX, Transaction);
            else
                UpdateYS_JX_GONGSIXX(YS_JX_GONGSIXX, Transaction);
            return YS_JX_GONGSIXX.ID == 0 ? false : true;
        }

        /// <summary>
        ///     根据YS_JX_GONGSIXX实体添加或修改YS_JX_GONGSIXX信息
        /// </summary>
        public bool InsertOrUpdate(YS_JX_GONGSIXX YS_JX_GONGSIXX)
        {
            return InsertOrUpdate(YS_JX_GONGSIXX, null);
        }


        /// <summary>
        ///     根据YS_JX_GONGSIXX主键删除YS_JX_GONGSIXX信息
        /// </summary>
        /// <param name="ID"></param>
        public bool DeleteYS_JX_GONGSIXX(decimal ID, OracleTransaction Transaction)
        {
            var spName = "CS_DelYS_JX_GONGSIXX";
            var storedParams = OracleHelperParameterCache.GetSpParameterSet(conn, spName);
            storedParams[0].Value = ID;
            var result = 0;
            if (Transaction == null)
                result = OracleHelper.ExecuteNonQuery(conn, CommandType.StoredProcedure, spName, storedParams);
            else
                result = OracleHelper.ExecuteNonQuery(Transaction, CommandType.StoredProcedure, spName, storedParams);
            return result == 0 ? false : true;
        }

        /// <summary>
        ///     根据YS_JX_GONGSIXX主键删除YS_JX_GONGSIXX信息
        /// </summary>
        /// <param name="ID"></param>
        public bool DeleteYS_JX_GONGSIXX(decimal ID)
        {
            return DeleteYS_JX_GONGSIXX(ID, null);
        }

        /// <summary>
        ///     根据条件删除YS_JX_GONGSIXX信息
        /// </summary>
        /// <param name="WhereClause">条件子句(Oracle语句)不带where</param>
        /// <param name="Transaction">事务，如果为null,则不做事务</param>
        /// <returns>如果删除成功，返回true,否则返回fals</returns>
        public bool DeleteYS_JX_GONGSIXXesDynamic(string WhereClause, OracleTransaction Transaction)
        {
            var spName = "CS_DelYS_JX_GONGSIXXesDyn";
            var storedParams = OracleHelperParameterCache.GetSpParameterSet(conn, spName);
            storedParams[0].Value = WhereClause;
            var result = 0;
            if (Transaction == null)
                result = OracleHelper.ExecuteNonQuery(conn, CommandType.StoredProcedure, spName, storedParams);
            else
                result = OracleHelper.ExecuteNonQuery(Transaction, CommandType.StoredProcedure, spName, storedParams);
            return result == 0 ? false : true;
        }

        /// <summary>
        ///     根据条件删除YS_JX_GONGSIXX信息
        /// </summary>
        /// <param name="WhereClause">条件子句(Oracle语句)不带where</param>
        /// <param name="Transaction">事务，如果为null,则不做事务</param>
        /// <returns>如果删除成功，返回true,否则返回fals</returns>
        public bool DeleteYS_JX_GONGSIXXesDynamic(string WhereClause)
        {
            return DeleteYS_JX_GONGSIXXesDynamic(WhereClause, null);
        }

        /// <summary>
        ///     根据YS_JX_GONGSIXX主键选择YS_JX_GONGSIXX信息
        /// </summary>
        /// <param name="Transaction">事务，如果为null,则不做事务</param>
        /// <returns>YS_JX_GONGSIXX信息</returns>
        public YS_JX_GONGSIXX SelectYS_JX_GONGSIXX(decimal ID, OracleTransaction Transaction)
        {
            var spName = "CS_SelYS_JX_GONGSIXX";
            var storedParams = OracleHelperParameterCache.GetSpParameterSet(conn, spName);
            storedParams[0].Value = ID;
            OracleDataReader rd;
            if (Transaction == null)
                rd = OracleHelper.ExecuteReader(conn, CommandType.StoredProcedure, spName, storedParams);
            else
                rd = OracleHelper.ExecuteReader(Transaction, CommandType.StoredProcedure, spName, storedParams);
            if (rd.Read())
            {
                var YS_JX_GONGSIXX = PopulateYS_JX_GONGSIXX(rd);
                rd.Close();
                return YS_JX_GONGSIXX;
            }
            return null;
        }

        /// <summary>
        ///     根据YS_JX_GONGSIXX主键选择YS_JX_GONGSIXX信息
        /// </summary>
        /// <returns>YS_JX_GONGSIXX信息</returns>
        public YS_JX_GONGSIXX SelectYS_JX_GONGSIXX(decimal ID)
        {
            return SelectYS_JX_GONGSIXX(ID, null);
        }

        /// <summary>
        ///     选择所有YS_JX_GONGSIXX信息
        /// </summary>
        /// <param name="Transaction">事务，如果为null,则不做事务</param>
        /// <returns>所有YS_JX_GONGSIXX信息</returns>
        public DataTable SelectYS_JX_GONGSIXXesAll(OracleTransaction Transaction)
        {
            var spName = "CS_SelYS_JX_GONGSIXXesAll";
            var storedParams = OracleHelperParameterCache.GetSpParameterSet(conn, spName);
            DataSet ds = null;
            if (Transaction == null)
                ds = OracleHelper.ExecuteDataset(conn, CommandType.StoredProcedure, spName, storedParams);
            else
                ds = OracleHelper.ExecuteDataset(Transaction, CommandType.StoredProcedure, spName, storedParams);
            if (ds != null && ds.Tables.Count > 0)
            {
                AddRowNumber(ds.Tables[0]);
                return ds.Tables[0];
            }
            return null;
        }

        /// <summary>
        ///     选择所有YS_JX_GONGSIXX信息
        /// </summary>
        /// <returns>所有YS_JX_GONGSIXX信息</returns>
        public DataTable SelectYS_JX_GONGSIXXesAll()
        {
            return SelectYS_JX_GONGSIXXesAll(null);
        }

        /// <summary>
        ///     根据条件选择YS_JX_GONGSIXX信息
        /// </summary>
        /// <param name="WhereClause">条件子句(不带where)</param>
        /// <param name="OrderByExpression">排序子句</param>
        /// <param name="Transaction">事务，如果为null,则不做事务</param>
        /// <returns>YS_JX_GONGSIXX信息</returns>
        public DataTable SelectYS_JX_GONGSIXXesDynamic(string WhereClause, string OrderByExpression,
            OracleTransaction Transaction)
        {
            var spName = "CS_SelYS_JX_GONGSIXXesDyn";
            var storedParams = OracleHelperParameterCache.GetSpParameterSet(conn, spName);
            storedParams[0].Value = string.IsNullOrEmpty(WhereClause.Trim()) ? "1=1" : WhereClause;
            storedParams[1].Value = OrderByExpression;
            DataSet ds = null;
            if (Transaction == null)
                ds = OracleHelper.ExecuteDataset(conn, CommandType.StoredProcedure, spName, storedParams);
            else
                ds = OracleHelper.ExecuteDataset(Transaction, CommandType.StoredProcedure, spName, storedParams);
            if (ds != null && ds.Tables.Count > 0)
            {
                AddRowNumber(ds.Tables[0]);
                return ds.Tables[0];
            }
            return null;
        }


        /// <summary>
        ///     根据条件选择YS_JX_GONGSIXX信息
        /// </summary>
        /// <param name="WhereClause">条件子句(不带where)</param>
        /// <param name="OrderByExpression">排序子句</param>
        /// <returns>YS_JX_GONGSIXX信息</returns>
        public DataTable SelectYS_JX_GONGSIXXesDynamic(string WhereClause, string OrderByExpression)
        {
            return SelectYS_JX_GONGSIXXesDynamic(WhereClause, OrderByExpression, null);
        }


        /// <summary>
        ///     根据条件选择YS_JX_GONGSIXX信息
        /// </summary>
        /// <param name="WhereClause">条件子句(不带where)</param>
        /// <param name="OrderByExpression">排序子句</param>
        /// <param name="PageIndex">页码</param>
        /// <param name="PageSize">页数</param>
        /// <param name="Transaction">事务，如果为null,则不做事务</param>
        /// <returns>YS_JX_GONGSIXX信息</returns>
        public DataTable SelectYS_JX_GONGSIXXesDynamic(string WhereClause, string OrderByExpression, int PageIndex,
            int PageSize, OracleTransaction Transaction)
        {
            var spName = "CS_SelYS_JX_GONGSIXXesDynPaged";
            var storedParams = OracleHelperParameterCache.GetSpParameterSet(conn, spName);
            storedParams[0].Value = string.IsNullOrEmpty(WhereClause.Trim()) ? "1=1" : WhereClause;
            storedParams[1].Value = OrderByExpression;
            storedParams[2].Value = PageIndex;
            storedParams[3].Value = PageSize;
            DataSet ds = null;
            if (Transaction == null)
                ds = OracleHelper.ExecuteDataset(conn, CommandType.StoredProcedure, spName, storedParams);
            else
                ds = OracleHelper.ExecuteDataset(Transaction, CommandType.StoredProcedure, spName, storedParams);
            if (ds != null && ds.Tables.Count > 0)
            {
                AddRowNumber(ds.Tables[0]);
                return ds.Tables[0];
            }
            return null;
        }


        /// <summary>
        ///     根据条件选择YS_JX_GONGSIXX信息
        /// </summary>
        /// <param name="WhereClause">条件子句(不带where)</param>
        /// <param name="OrderByExpression">排序子句</param>
        /// <param name="PageIndex">页码</param>
        /// <param name="PageSize">页数</param>
        /// <returns>YS_JX_GONGSIXX信息</returns>
        public DataTable SelectYS_JX_GONGSIXXesDynamic(string WhereClause, string OrderByExpression, int PageIndex,
            int PageSize)
        {
            return SelectYS_JX_GONGSIXXesDynamic(WhereClause, OrderByExpression, PageIndex, PageSize, null);
        }

        /// <summary>
        ///     根据条件更新YS_JX_GONGSIXX字段
        /// </summary>
        /// <returns>受影响行数</returns>
        public int UpdateYS_JX_GONGSIXXesDynamic(string UpdateValue, string WhereClause, OracleTransaction Transaction)
        {
            var result = 0;
            if (UpdateValue == "" || WhereClause == "")
                return 0;
            var spName = "CS_UpdYS_JX_GONGSIXXDyn";
            var storedParams = OracleHelperParameterCache.GetSpParameterSet(conn, spName);
            DataSet ds = null;
            storedParams[0].Value = UpdateValue;
            storedParams[1].Value = WhereClause;
            if (Transaction == null)
                ds = OracleHelper.ExecuteDataset(conn, CommandType.StoredProcedure, spName, storedParams);
            else
                ds = OracleHelper.ExecuteDataset(Transaction, CommandType.StoredProcedure, spName, storedParams);
            result = Convert.ToInt32(storedParams[2].Value);
            return result;
        }

        /// <summary>
        ///     根据条件更新YS_JX_GONGSIXX字段
        /// </summary>
        /// <returns>受影响行数</returns>
        public int UpdateYS_JX_GONGSIXXesDynamic(string UpdateValue, string WhereClause)
        {
            return UpdateYS_JX_GONGSIXXesDynamic(UpdateValue, WhereClause, null);
        }

        #endregion

        #region Private

        private int InsertYS_JX_GONGSIXX(YS_JX_GONGSIXX YS_JX_GONGSIXX, OracleTransaction Transaction)
        {
            var spName = "CS_InsYS_JX_GONGSIXX";
            var storedParams = OracleHelperParameterCache.GetSpParameterSet(conn, spName);
            storedParams[0].Value = YS_JX_GONGSIXX.S_ZHANDIANBH;
            storedParams[1].Value = YS_JX_GONGSIXX.S_BIANHAO;
            storedParams[2].Value = YS_JX_GONGSIXX.S_MINGCHENG;
            storedParams[3].Value = YS_JX_GONGSIXX.S_JUBIANH;
            storedParams[4].Value = YS_JX_GONGSIXX.S_DIZHI;
            storedParams[5].Value = YS_JX_GONGSIXX.S_YOUBIAN;
            storedParams[6].Value = YS_JX_GONGSIXX.S_LIANXIBM;
            storedParams[7].Value = YS_JX_GONGSIXX.S_LIANXIR;
            storedParams[8].Value = YS_JX_GONGSIXX.S_LIANXIDH;
            storedParams[9].Value = YS_JX_GONGSIXX.I_YEWUY;
            storedParams[10].Value = YS_JX_GONGSIXX.D_XIUGAI;
            storedParams[11].Value = YS_JX_GONGSIXX.I_XIUGAIR;
            storedParams[12].Value = YS_JX_GONGSIXX.D_XINZENGRQ;
            storedParams[13].Value = YS_JX_GONGSIXX.I_LEIXING;
            storedParams[14].Value = YS_JX_GONGSIXX.S_BEIZHU;
            storedParams[15].Value = YS_JX_GONGSIXX.I_JLZT;
            storedParams[16].Value = YS_JX_GONGSIXX.S_CAOZUOR;
            storedParams[17].Value = YS_JX_GONGSIXX.D_CAOZUOSJ;
            storedParams[18].Value = YS_JX_GONGSIXX.S_BEIYONG1;
            storedParams[19].Value = YS_JX_GONGSIXX.S_BEIYONG2;
            storedParams[20].Value = YS_JX_GONGSIXX.I_BEIYONG3;
            storedParams[21].Value = YS_JX_GONGSIXX.I_BEIYONG4;
            var result = 0;
            if (Transaction == null)
                result = OracleHelper.ExecuteNonQuery(conn, CommandType.StoredProcedure, spName, storedParams);
            else
                result = OracleHelper.ExecuteNonQuery(Transaction, CommandType.StoredProcedure, spName, storedParams);
            YS_JX_GONGSIXX.ID = Convert.ToInt32(storedParams[22].Value);
            return result;
        }

        private bool UpdateYS_JX_GONGSIXX(YS_JX_GONGSIXX YS_JX_GONGSIXX, OracleTransaction Transaction)
        {
            var spName = "CS_UpdYS_JX_GONGSIXX";
            var storedParams = OracleHelperParameterCache.GetSpParameterSet(conn, spName);
            storedParams[0].Value = YS_JX_GONGSIXX.S_ZHANDIANBH;
            storedParams[1].Value = YS_JX_GONGSIXX.S_BIANHAO;
            storedParams[2].Value = YS_JX_GONGSIXX.S_MINGCHENG;
            storedParams[3].Value = YS_JX_GONGSIXX.S_JUBIANH;
            storedParams[4].Value = YS_JX_GONGSIXX.S_DIZHI;
            storedParams[5].Value = YS_JX_GONGSIXX.S_YOUBIAN;
            storedParams[6].Value = YS_JX_GONGSIXX.S_LIANXIBM;
            storedParams[7].Value = YS_JX_GONGSIXX.S_LIANXIR;
            storedParams[8].Value = YS_JX_GONGSIXX.S_LIANXIDH;
            storedParams[9].Value = YS_JX_GONGSIXX.I_YEWUY;
            storedParams[10].Value = YS_JX_GONGSIXX.D_XIUGAI;
            storedParams[11].Value = YS_JX_GONGSIXX.I_XIUGAIR;
            storedParams[12].Value = YS_JX_GONGSIXX.D_XINZENGRQ;
            storedParams[13].Value = YS_JX_GONGSIXX.I_LEIXING;
            storedParams[14].Value = YS_JX_GONGSIXX.S_BEIZHU;
            storedParams[15].Value = YS_JX_GONGSIXX.I_JLZT;
            storedParams[16].Value = YS_JX_GONGSIXX.S_CAOZUOR;
            storedParams[17].Value = YS_JX_GONGSIXX.D_CAOZUOSJ;
            storedParams[18].Value = YS_JX_GONGSIXX.S_BEIYONG1;
            storedParams[19].Value = YS_JX_GONGSIXX.S_BEIYONG2;
            storedParams[20].Value = YS_JX_GONGSIXX.I_BEIYONG3;
            storedParams[21].Value = YS_JX_GONGSIXX.I_BEIYONG4;
            storedParams[22].Value = YS_JX_GONGSIXX.ID;
            var result = 0;
            if (Transaction == null)
                result = OracleHelper.ExecuteNonQuery(conn, CommandType.StoredProcedure, spName, storedParams);
            else
                result = OracleHelper.ExecuteNonQuery(Transaction, CommandType.StoredProcedure, spName, storedParams);
            return result == 0 ? false : true;
        }


        private YS_JX_GONGSIXX PopulateYS_JX_GONGSIXX(IDataReader dr)
        {
            var YS_JX_GONGSIXX = new YS_JX_GONGSIXX();
            YS_JX_GONGSIXX.ID = dr["ID"] == DBNull.Value ? 0 : (decimal) dr["ID"];
            YS_JX_GONGSIXX.S_ZHANDIANBH = dr["S_ZHANDIANBH"] == DBNull.Value ? null : (string) dr["S_ZHANDIANBH"];
            YS_JX_GONGSIXX.S_BIANHAO = dr["S_BIANHAO"] == DBNull.Value ? null : (string) dr["S_BIANHAO"];
            YS_JX_GONGSIXX.S_MINGCHENG = dr["S_MINGCHENG"] == DBNull.Value ? null : (string) dr["S_MINGCHENG"];
            YS_JX_GONGSIXX.S_JUBIANH = dr["S_JUBIANH"] == DBNull.Value ? null : (string) dr["S_JUBIANH"];
            YS_JX_GONGSIXX.S_DIZHI = dr["S_DIZHI"] == DBNull.Value ? null : (string) dr["S_DIZHI"];
            YS_JX_GONGSIXX.S_YOUBIAN = dr["S_YOUBIAN"] == DBNull.Value ? null : (string) dr["S_YOUBIAN"];
            YS_JX_GONGSIXX.S_LIANXIBM = dr["S_LIANXIBM"] == DBNull.Value ? null : (string) dr["S_LIANXIBM"];
            YS_JX_GONGSIXX.S_LIANXIR = dr["S_LIANXIR"] == DBNull.Value ? null : (string) dr["S_LIANXIR"];
            YS_JX_GONGSIXX.S_LIANXIDH = dr["S_LIANXIDH"] == DBNull.Value ? null : (string) dr["S_LIANXIDH"];
            YS_JX_GONGSIXX.I_YEWUY = dr["I_YEWUY"] == DBNull.Value ? null : (decimal?) dr["I_YEWUY"];
            YS_JX_GONGSIXX.D_XIUGAI = dr["D_XIUGAI"] == DBNull.Value ? null : (DateTime?) dr["D_XIUGAI"];
            YS_JX_GONGSIXX.I_XIUGAIR = dr["I_XIUGAIR"] == DBNull.Value ? null : (string) dr["I_XIUGAIR"];
            YS_JX_GONGSIXX.D_XINZENGRQ = dr["D_XINZENGRQ"] == DBNull.Value ? null : (DateTime?) dr["D_XINZENGRQ"];
            YS_JX_GONGSIXX.I_LEIXING = dr["I_LEIXING"] == DBNull.Value ? null : (decimal?) dr["I_LEIXING"];
            YS_JX_GONGSIXX.S_BEIZHU = dr["S_BEIZHU"] == DBNull.Value ? null : (string) dr["S_BEIZHU"];
            YS_JX_GONGSIXX.I_JLZT = dr["I_JLZT"] == DBNull.Value ? null : (decimal?) dr["I_JLZT"];
            YS_JX_GONGSIXX.S_CAOZUOR = dr["S_CAOZUOR"] == DBNull.Value ? null : (string) dr["S_CAOZUOR"];
            YS_JX_GONGSIXX.D_CAOZUOSJ = dr["D_CAOZUOSJ"] == DBNull.Value ? null : (DateTime?) dr["D_CAOZUOSJ"];
            YS_JX_GONGSIXX.S_BEIYONG1 = dr["S_BEIYONG1"] == DBNull.Value ? null : (string) dr["S_BEIYONG1"];
            YS_JX_GONGSIXX.S_BEIYONG2 = dr["S_BEIYONG2"] == DBNull.Value ? null : (string) dr["S_BEIYONG2"];
            YS_JX_GONGSIXX.I_BEIYONG3 = dr["I_BEIYONG3"] == DBNull.Value ? null : (decimal?) dr["I_BEIYONG3"];
            YS_JX_GONGSIXX.I_BEIYONG4 = dr["I_BEIYONG4"] == DBNull.Value ? null : (decimal?) dr["I_BEIYONG4"];
            return YS_JX_GONGSIXX;
        }


        private void AddRowNumber(DataTable dt)
        {
            dt.Columns.Add(new DataColumn("RowNumber", typeof(int)));
            for (var i = 0; i < dt.Rows.Count; i++)
                dt.Rows[i][dt.Columns.Count - 1] = i + 1;
        }

        #endregion
    }
}

#endregion